/**
 * 系统设置权限设置添加管理员
 */
import './index.less'
import tem from './index.html'
import $_fn from '~plugins'
class minxiCtrl {
  constructor($scope,$rootScope,http,$ui) {
  	  console.log($scope.params)
      $scope.cancel = function () {
          $rootScope.$uiDirectiveModal.close() //关闭方法
      }
  	  $scope.param1={
  	  	repayment_time:JSON.parse($scope.params).repayment_time,
  	  }
  	  $scope.param2={}
  	  //信息请求
  	   $scope.getDada = function(){
	        http.post('selectAfterLoanFundPlanDetail.do',$scope.param1,function (data) {
	            if(data.errcode > 0){
	                $scope.$apply(function () {
	                    $scope.param2.dataList = data.data.list;
	                    $scope.param2.page = data.data;
	                })
	            }else{
	            	$ui.toast({
						text:data.errmsg,
						type:'warning'
					})
	            }
	        },function(){
	            //报错时
	            $scope.isData = true
	            $scope.$apply()
	        })
	    }
  	  $scope.getDada()
  	  
  	  
  	  
  	  
  	  
		
  }
}
minxiCtrl.$inject = ['$scope','$rootScope','http','$ui']
module.exports = angular.module('directive.minxi', []).directive('minxi', function() {
    return {
        template: tem,
        replace:true,
        controller: minxiCtrl,
        scope:{
        	params:"@"
        }
    }
}).name